#ifndef WXSGUI_H
#define WXSGUI_H

#include <configurationpanel.h>
#include <tinyxml.h>
#include "wxsguifactory.h"
#include "wxsproject.h"


class wxsGUI: public wxObject {
    DECLARE_CLASS( wxsGUI )
  public:


    wxsGUI( const wxString& GUIName, wxsProject* Project );


    virtual ~wxsGUI();


    inline wxsProject* GetProject() const { return M_Code_Project; }


    inline const wxString& GetName() const { return m_Name; }


    inline wxString GetProjectPath() { return M_Code_Project->GetProjectPath(); }


    inline void NotifyChange() { M_Code_Project->NotifyChange(); }


    inline void ReadConfig( TiXmlElement* Node ) { OnReadConfig( Node ); }


    inline void WriteConfig( TiXmlElement* Node ) { OnWriteConfig( Node ); }


    inline bool CheckIfApplicationManaged() { return OnCheckIfApplicationManaged(); }


    inline cbConfigurationPanel* BuildConfigurationPanel( wxWindow* Parent ) { return OnBuildConfigurationPanel( Parent ); }


    inline bool CreateApplicationBinding() { return OnCreateApplicationBinding(); }


    inline void RebuildApplicationCode() { OnRebuildApplicationCode(); }

  protected:


    virtual cbConfigurationPanel* OnBuildConfigurationPanel( wxWindow* Parent ) = 0;


    virtual void OnRebuildApplicationCode() = 0;


    virtual bool OnCheckIfApplicationManaged() = 0;


    virtual bool OnCreateApplicationBinding() = 0;


    virtual void OnReadConfig( TiXmlElement* element ) = 0;


    virtual void OnWriteConfig( TiXmlElement* element ) = 0;

  private:

    const wxString m_Name;          ///< \brief name of this GUI module (f.ex wxWidgets)
    wxsProject* const M_Code_Project;    ///< \brief wxsProject class using this GUI class
};

#endif
